package sch.guo.crmsys.mapper.cop;

import org.apache.ibatis.annotations.Param;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.RequestParam;
import sch.guo.crmsys.dto.cop.ChartDTO;
import sch.guo.crmsys.dto.cop.OrderDTO;
import sch.guo.crmsys.dto.cop.OrderStatementDTO;
import sch.guo.crmsys.entity.cop.CopOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2019-12-31
 */
public interface CopOrderMapper extends BaseMapper<CopOrder> {

    List<OrderDTO> selectOrderList(@Param(value = "userId") Long userId,@Param(value = "clientName") String clientName,
                                   @Param(value = "pageNum")int pageNum, @Param(value = "pageSize")int pageSize);

    List<OrderDTO> selectStatement(OrderStatementDTO orderStatementDTO);

    List<OrderDTO> selectRunningStatement(OrderStatementDTO orderStatementDTO);

    int countOrderList(@Param(value = "userId") Long userId,@Param(value = "clientName") String clientName);

    List<ChartDTO> countSaleProductSize(@Param(value = "status") int status,@Param(value = "time")  LocalDateTime time);

    List<ChartDTO> countSalePrice(@Param(value = "status") int status,@Param(value = "time")  LocalDateTime time);

    List<ChartDTO> countClientBuy(@Param(value = "status") int status,@Param(value = "time")  LocalDateTime time);

    List<ChartDTO> countClientGen(@Param(value = "status") int status,@Param(value = "time")  LocalDateTime time);

}
